<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
</html>

<script>
  function secret(a) {
    let first = parseInt(a / 1000);
    let second = parseInt(a / 100) % 10;
    let third = parseInt(a / 10) % 10;
    let four = a % 10;
    let final =
      `${(four + 5) % 10}` +
      `${(third + 5) % 10}` +
      `${(second + 5) % 10}` +
      `${(first + 5) % 10}`;
    console.log(final);
  }

  secret(4684);
</script>
